home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / HackAddict™ Magazine / HA 1-12 / HackAddict09.sit / HackAddict 9 ƒ / HackAddict™ 9.rsrc / TEXT_131.txt < prev    next >
Text File  |  1998-01-09  |  9KB  |  209 lines

  1.  
  2.       UNIX - The Series
  3.  
  4.  
  5. By Fuzebox
  6.  
  7.  
  8. Table of Contents
  9. ‚Ä¢ Introduction
  10. ‚Ä¢ Commands, instructions, and Things You Type
  11. ‚Ä¢ Modes: what they are, and how to push them around
  12. ‚Ä¢ hX: Installing Hotline for UNIX
  13. ‚Ä¢ But alas, a closing
  14.  
  15.  
  16. Introduction
  17.  
  18. Hey, I'm back for a third issue of Unix: TS. I seem to have received
  19. overwhelming support from readers (all positive this time around). CYphrak from Haxor.com was happy for the advertising I gave haxor.com. Aside from the multitude of spelling
  20. errors, last issue was pretty good. (This issue I am planning on using a spell checker.) So anyway, I'll quickly cover a few pressing issues.
  21.  
  22. Linux vs BSD, and the different shells
  23.  
  24. So far I have been proclaiming BSD as "The UNIX to use", because my two shell accounts are running BSD. However, I have found that almost everyone else has Linux shell, or is running MkLinux or LinuxPPC on their computer (maybe one day I
  25. will get into that.) I have also found that most of the cool programs and exploit scripts will only compile without modification on a Linux system. (You can modify it I guess, but you will have to
  26. have some programming knowledge.) It seems Linux is the Windoze 95 of UNIXes...
  27. It's compatible with everything and used by more people, but not
  28. necessarily better. BSD is faster and more stable, and that is a proven fact. (Sorry, Linux guys :).
  29.  
  30. I have also found that some people don't like the C shell. Well, if you know enough about another shell that you like it better, use it by all means. I'm just suggesting to you what I believe will work the best according to the directions I give you. It seems that the Bash shell is the most popular, but mainly because it is set as the default when you get an account nowadays.
  31.  
  32. Some Notes On The Bash Shell:
  33.  
  34. Hagz noted a couple of issues ago that by erasing your ".bash_history" file, you eliminate you log. However, if you use the C shell, the file you have to erase is
  35. just called ".history". I put a neat little script into my .login file:
  36.  
  37. rm .history
  38. cp /school/report.doc ~/.history
  39.  
  40. Ok, so all this does is replace the ".history" file with a file of my
  41. choosing. Inside the file is clever insults and taunts at my admin, who regularly goes through everyone's history files. The reason I put this in my login file is so it is replaced every time I log in, because my admin has set up the server so it recovers the history file and puts it back in it's original position the next time I log in. Very annoying.
  42.  
  43. Also, the ".bash_profile" is called ".cshrc" in the C shell.
  44.  
  45.  
  46.  
  47. Commands, Instructions, and Things You Can Type
  48.  
  49.  
  50. which   -    Shows you the path to a specified program.
  51.  
  52. example:
  53.  
  54. % which perl
  55. /bin/perl
  56.  
  57. This is useful if you are using shells/perl scripts, and want to know the path to the shell/perl program.
  58.  
  59. tar      -    The UNIX standard for compression (Like Stuffit). Anyway,
  60. you can use this to uncompress those file.tar files, or even
  61. file.tar.gz files, which are also common.
  62.  
  63. example:
  64.  
  65. To uncompress a ".tar" file:
  66. %  tar filename.tar -xf
  67.  
  68. This will decompress it and delete the original.
  69.  
  70. To uncompress a ".tar.gz" file:
  71. %  tar filename.tar.gz -zxf
  72.  
  73. banner        -     Takes your text and attempts to make ASCII art of
  74. it. This only works well on some systems, so please don't complain if it doesn't work for you.
  75.  
  76. example:
  77.  
  78. % banner "Mac"
  79.  
  80.  000 000    00    00000
  81. 0   0  0   0  0   0
  82. 0   0   0  0000   0
  83. 0   0   0  0  0   0
  84. 0   0   0  0  0   00000
  85.  
  86. Note: This is a completely useless command.
  87.  
  88.  
  89.  
  90. Modes: What they are, and how to push them around
  91.  
  92.     If you know anything about the Mac OS, you'll know that every file on your hard drive is given certain "Finder-flags". These are little bits of info that describe what kind of file it is, if it's invisible, locked, etc. Well, UNIX has it's own variant of these. They are
  93. called "modes". Modes are a bit complicated. For example, if you type
  94.  
  95. %  ls -l
  96.  
  97. you will get:
  98. rwx------  .login  01/08/98
  99.  
  100. (Or something like that.) Anyway, I'm trying to explain what those little "rwx"s in the corner mean. The characters in the corner are the modes. The "r" is for "read", the "w" for "write", and the "x" for "execute". There are also 9 slots, for 3 of each of these modes.
  101. The first three slots are your access. (Obviously you would want full
  102. access on all of your files!). The second three slots are your group members' access. The third set is the rest of the server's access.
  103.  
  104. NOTE: I never mentioned anything about groups before, but users can be categorized into groups to make assigning accounts easier... Much how HackAddict's groups
  105. are divided into "Admin", "Co-Admin", "Regular User", and "Guest"... :)
  106.  
  107. Changing modes
  108.  
  109. To change a mode on a file, you use the following syntax:
  110.  
  111. % chmod "parameters" "filename"
  112.  
  113. The parameters can be simple like "+r", "+w", or "+x", or they can be
  114. complicated like "731". The numbers are actually quite simple and convenient. I'll illustrate this:
  115.  
  116. r = 1
  117. w = 2
  118. x = 4
  119.  
  120. A neat mathematical thing to notice here is that adding these numbers up in different combinations can make new unique numbers. Unix knows this, which makes it easy to set
  121. modes for all three sets of slots quickly:
  122.  
  123. example:
  124.  
  125. % chmod 744 game
  126.  
  127. This will give me read, write and execute access on my game, and everyone else on my server execute access.
  128.  
  129. NOTE: Do not give write access without read access. This is very weird.
  130.  
  131.  
  132. hX: Hotline for UNIX!
  133.  
  134.     hX is a wonderful creation from the good folks at Haxor, inc.
  135. (More advertising :) hX is more like an IRC client, but it can connect to servers, post/read news, transfer files, and chat.
  136.  
  137. Installing
  138.  
  139. 1. To install hX, first upload the compressed file to your shell using
  140. Fetch, or ftp it from hx.haxor.com within your shell. 
  141.  
  142. *Make sure you have a "bin" directory in
  143. your home directory. If you don't, type "cd ~" and then "mkdir bin".
  144.  
  145. 2. Next, type "tar hx.tar.gz -zxf" and it will decompress. (Replace
  146. "hX.tar.gz" with whatever you called it.)
  147.  
  148. 3. Now, type "cd /hX/src" to move you into the source directory.
  149.  
  150. 4. Now type "make makefile" and watch as UNIX compiles it for you. Don't ask me what all the stuff that scrolls up your screen means. (Not that I don't know of course, just that I'm too busy to tell you... Yeah... that's it...)
  151.  
  152. 5. Now comes the fun part. Type "cd ~" to get into your home directory, and then "hx" to start it. Of course, you still don't know how to use it though... be patient...
  153.  
  154. Using hX
  155.  
  156. - Bookmarks
  157.  
  158. Making bookmarks is a good idea, because as far as I know, hX doesn't support the tracker. Meaning you have to know the addresses for all your servers. Anyway, bookmarks are stored in a directory called ".hX" in your home directory. Here's how you
  159. create a bookmark:
  160.  
  161. 1. Type "cd ~/.hX" to get yourself into your hX prefs directory.
  162.  
  163. 2. Type "pico bookmarkname" (replace "bookmarkname" with the name of the bookmark.)
  164.  
  165. 3. Now put the following information in the file:
  166.  
  167.     l=login
  168.     p=password
  169.     s=server address
  170.     P=server port  (default = 5500)
  171.     n=nickname
  172.  
  173. - Starting hX
  174.  
  175. The following command parameters are valid in hX:
  176.  
  177. hx [-s server] [-p port] [-n nickname] [-i icon] [-b bookmark] [--help]
  178.  
  179. Yes, even though you can't see your icon, typing "-i" and it's resource id will make it show up!
  180.  
  181. Most of hX's commands are either irc commands or ftp commands (both of which you should know anyway. :) I don't think I can justly reproduce the manual here, because it's as simple and easy to understand as possible. I strongly urge you to read it (you'll find it
  182. in " ~/hX/doc/hX.1 ".
  183.  
  184.  
  185. A few more notes on hX
  186.  
  187. The hX package comes with server and tracker programs as well. I
  188. have know idea to how to use these, and I have no desire to learn either. I use hX mainly so I can visit HackAddict when I'm somewhere where I can telnet from such as the mall or library or
  189. school. I guess I'd rather keep the running hotline servers to my trusty Mac, that's all. :) 
  190.  
  191. ‚Ä¢Editor's Note: I included the entire hX archive from hx.haxor.com with this issue...Try it!
  192.  
  193.  
  194. Some closing remarks
  195.  
  196. I'm quite afraid I delayed the arrival of Hackaddict 9, because of
  197. a number of things:
  198.  
  199. - During the holidays I was away from my computer, with only a 286 to keepme company :(
  200. - I got violently ill, and spent two days vomiting
  201. - School all of a sudden got hard and I actually had to start paying attention.
  202.  
  203. Well, there are my excuses. My apologies go to The Weasel and all of you readers who devotedly logged on to HA every day to see if this issue had come yet. Well now I'm finally done. As soon as I finish typing this conclusion I'll send it to The Weasel. Right.
  204. As soon as I finish typing. Just a few more words now... Type type
  205. type... Aagh okay, I'm done. :)
  206.  
  207. - Fuzebox out.
  208.  
  209.